import pandas as pd
import plotly.express as px

x = ["f1", "f2", "f3", "f4", "f5"]
y1 = [5, 20, 36, 10, 75]
y2 = [10, 25, 8, 60, 20]
df=pd.DataFrame({"特征": x, "模型A": y1, "模型B": y2})

fig = px.bar(data_frame= df, x = "特征",y= ["模型A","模型B"],
       title = "特征重要性分析",barmode = "group") #barmode is one of "relative","overlay","group"
fig.layout.yaxis.title = "重要性"
fig.show()
